package com.turing.draw.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.turing.draw.model.domain.FileImage;
import com.turing.draw.vo.out.PageSize;

import java.util.List;
import java.util.Map;

/**
 * @Description $!{table.comment} 服务类接口
 * @Author lcy
 * @Date 2021-10-25
 */
public interface FileImageService extends IService<FileImage> {

    String getImageUrl( String childTaskSn, Integer pageNo );

    FileImage getFileImageByPage(String taskSn,Integer pageNo);

    boolean updateFileImage(String taskSn, Integer pageNo, String imageUrl,Integer width,Integer height);

    boolean saveJsonUrl(String taskSn, Integer pageNo, String pageJsonUrl);

    JSONObject getPageJson(String taskSn, Integer pageNo);

    Map<Integer,JSONObject> batchGetPageJson(String taskSn, List<Integer> pages);

    List<FileImage> getFileImageByPages(String taskSn, List<Integer> pages);

    boolean saveFileImage(String parentTaskSn, String taskSn, Integer pageNo, String imageUrl, Integer width, Integer height);

    List<PageSize> getPagesSize(String taskSn);

}
